home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / asm / alib11b.zip / CODE1.ZIP / DISPGRAP / CRT_GETC.ASM < prev    next >
Assembly Source File  |  1980-01-01  |  944b  |  57 lines

  1.  
  2. ;-----------------------------------------------------------------------
  3. ;
  4. ; name        crt_getca -- get character and attribute
  5. ;
  6. ; synopsis    VOID    crt_getca(page)
  7. ;            int    page;
  8. ;  
  9. ; description    Reads character and attribute under cursor on
  10. ;        video page number "page". On return, character
  11. ;        in low byte ( ch = crt_getca(0) & 255), and 
  12. ;        attribute is in high byte ( atr = crt_getca(0) >> 8).
  13. ; notes        use crt_gotoxy to position cursor to desired row, 
  14. ;        col, and page. 
  15. ;
  16. ;----------------------------------------------------------------------
  17.  
  18.  
  19.     include    dos.mac
  20.  
  21. video    equ    10h        ; video interrupt number
  22.  
  23.  
  24.     IF    LPROG
  25. X    EQU    6        ;OFFSET OF ARGUMENTS
  26.     ELSE
  27. X    EQU    4        ;OFFSET OF ARGUMENTS
  28.     ENDIF
  29.  
  30.     PSEG
  31.  
  32.  
  33.     PUBLIC    crt_getca
  34.  
  35.     IF    LPROG
  36. crt_getca    PROC    FAR
  37.     ELSE
  38. crt_getca    PROC    NEAR
  39.     ENDIF
  40.  
  41.  
  42.     push    bp
  43.     mov    bp,sp
  44.     mov    bh,[bp+x]    
  45.     mov    ah,8
  46.     int    video
  47.     pop    bp
  48.     ret
  49.  
  50. crt_getca    endp
  51.  
  52.  
  53.     ENDPS    
  54.     END
  55.  
  56.